<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="入库单一览表" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link href="/css/Query.css" rel="stylesheet" type="text/css">
<link href="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/css/BillList.css" />
<script src="/js/QueryList.js"></script>
<script src="/js/popup_ext.js"></script>
<script src="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function doShow(id){
		var url="/storehouse/InBillEdit.ihtm?id="+id;
		ShowIframe("入库单",url,1024,500,"refreshWin()",1024,600);
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location.reload(true);
		}
	}
	function checkDateStr(){
		var startDate=document.getElementById("start_date").value;
		if(startDate==null || startDate==''){
			ShowAlert('提示框','请选择开始日期',200,100);
			return false;
		}else{
			var arr=startDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','开始日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','开始日期格式不正确',200,100);
				return false;
			}
		}
		var endDate=document.getElementById("end_date").value;
		if(endDate==null || endDate==''){
			ShowAlert('提示框','请选择结束日期',200,100);
			return false;
		}else{
			var arr=endDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','结束日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','结束日期格式不正确',200,100);
				return false;
			}
		}
		return true;
	}
	function createPageParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("end_date").value);
		
		var exa="A";
		if(document.getElementById("exa1").checked){
			exa="Y";
		}else if(document.getElementById("exa2").checked){
			exa="N";
		}
		str=str+"&exa="+exa;
		
		str=str+"&in_type="+document.getElementById("in_type").value;
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("bill_code").value);
		str=str+"&manager_name="+encodeURIComponent(document.getElementById("manager_name").value);
		str=str+"&offerer_type="+document.getElementById("offerer_type").value;
		str=str+"&offerer_name="+encodeURIComponent(document.getElementById("offerer_name").value);
		str=str+"&mark="+encodeURIComponent(document.getElementById("mark").value);
		str=str+"&sto_id="+document.getElementById("sto_id").value;
		str=str+"&ts_id="+document.getElementById("ts_id").value;
		str=str+"&order_by="+document.getElementById("order_by").value;
		str=str+"&order_sc="+document.getElementById("order_sc").value;
		
		return str;
	}
	
	function createProgramParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("hid_start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("hid_end_date").value);
		str=str+"&exa=${exa}";
		str=str+"&in_type=${inType}";
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("hid_bill_code").value);
		str=str+"&manager_name="+encodeURIComponent(document.getElementById("hid_manager_name").value);
		str=str+"&offerer_type=${offererType}";
		str=str+"&offerer_name="+encodeURIComponent(document.getElementById("hid_offerer_name").value);
		str=str+"&mark="+encodeURIComponent(document.getElementById("hid_mark").value);
		str=str+"&sto_id=${stoId}";
		str=str+"&ts_id=${tsId}";
		str=str+"&order_by=${orderBy}";
		str=str+"&order_sc=${orderSc}";
		
		return str;
	}
	function doSearch(){
		var str;
		if(IsAdvSearch){//高级
			str="search_type=1";
			if(document.getElementById("cb_in_date").checked){
				if(checkDateStr()){
					str=str+"&cb_in_date=1";
				}else{
					return;
				}
			}
			if(document.getElementById("cb_exa").checked){
				str=str+"&cb_exa=1";
			}
			if(document.getElementById("cb_in_type").checked){
				var inType=document.getElementById("in_type").value;
				if(inType==null || inType=="" || inType=="0"){
					ShowAlert('提示框','请选择入库类型',200,100);
					return;
				}
				str=str+"&cb_in_type=1";
			}
			if(document.getElementById("cb_bill_code").checked){
				var billCode=document.getElementById("bill_code").value.trim();
				if(billCode==null || billCode==""){
					ShowAlert('提示框','请输入单号',200,100);
					return;
				}
				str=str+"&cb_bill_code=1";
			}
			if(document.getElementById("cb_manager").checked){
				var managerName=document.getElementById("manager_name").value.trim();
				if(managerName==null || managerName==""){
					ShowAlert('提示框','请输入经办人姓名',200,100);
					return;
				}
				str=str+"&cb_manager=1";
			}
			if(document.getElementById("cb_offerer").checked){
				str=str+"&cb_offerer=1";
			}
			if(document.getElementById("cb_sto").checked){
				var stoId=document.getElementById("sto_id").value;
				if(stoId==null || stoId=="" || stoId=="0"){
					ShowAlert('提示框','请选择仓库',200,100);
					return;
				}
				str=str+"&cb_sto=1";
			}
			if(document.getElementById("cb_mark").checked){
				var mark=document.getElementById("mark").value.trim();
				if(mark==null || mark==""){
					ShowAlert('提示框','请输入备注',200,100);
					return;
				}
				str=str+"&cb_mark=1";
			}
			if(document.getElementById("cb_ts").checked){
				var tsId=document.getElementById("ts_id").value;
				if(tsId==null || tsId=="" || tsId=="0"){
					ShowAlert('提示框','请选择帐套',200,100);
					return;
				}
				str=str+"&cb_ts=1";
			}
			if(document.getElementById("cb_order").checked){
				var orderBy=document.getElementById("order_by").value;
				if(orderBy==null || orderBy==""){
					ShowAlert('提示框','请选择排序类型',200,100);
					return;
				}
				str=str+"&cb_order=1";
			}
		}else{//快速
			str="search_type=2";
			if(!checkDateStr()){
				return;
			}
		}
		var paraStr=createPageParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		window.location="/storehouse/InBillSearchResult.ihtm?"+str;
	}
	
	function doGo(pageIndex){
		var str=getSearchCondition();
		str=str+"&current_page="+pageIndex;
		window.location="/storehouse/InBillSearchResult.ihtm?"+str;
	}
	function getSearchCondition(){
		var searchType="${searchType}";
		var str="search_type="+searchType;
		if(searchType=="1"){//高级
			<c:if test="${cbInDate=='1'}">str=str+"&cb_in_date=1";</c:if>
			<c:if test="${cbInType=='1'}">str=str+"&cb_in_type=1";</c:if>
			<c:if test="${cbBillCode=='1'}">str=str+"&cb_bill_code=1";</c:if>
			<c:if test="${cbManager=='1'}">str=str+"&cb_manager=1";</c:if>
			<c:if test="${cbOfferer=='1'}">str=str+"&cb_offerer=1";</c:if>
			<c:if test="${cbMark=='1'}">str=str+"&cb_mark=1";</c:if>
			<c:if test="${cbExa=='1'}">str=str+"&cb_exa=1";</c:if>
			<c:if test="${cbSto=='1'}">str=str+"&cb_sto=1";</c:if>
			<c:if test="${cbTs=='1'}">str=str+"&cb_ts=1";</c:if>
			<c:if test="${cbOrder=='1'}">str=str+"&cb_order=1";</c:if>
		}else{//快速
			
		}
		var paraStr=createProgramParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		return str;
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function DoubleClick(it){
		var ob_arr = document.getElementsByName("query_checkbox");
		var id="";
		if(ob_arr.length>=it.getAttribute("index")){
			id=ob_arr[it.getAttribute("index")-1].value;
		}
		if(id==""){
			return;
		}
		doShow(id);
	}
	
	function doCancel(){
		window.close();
	}
	function doInit(){
		Window_Onload();
	}
	function checkInput(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doPrint(id){
		<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';STOR_COST;')!=-1}">
			ShowConfirm('确认框','是否打印金额？',340,80,"doPrintCallBack("+id+")");
		</c:if>
		<c:if test="${currentUser.user.userType!=1 && fn:indexOf(currentUser.privs,';STOR_COST;')==-1}">
			showWin(900,600,"/storehouse/InBillPrint.ihtm?id="+id);
		</c:if>
	}
	function doPrintCallBack(id){
		var printCost="0";
		if(popRetVal!=null){
			printCost="1";
		}
		showWin(900,600,"/storehouse/InBillPrint.ihtm?id="+id+"&print_cost="+printCost);
	}
	function doAutoCheck(objId){
		document.getElementById(objId).checked=true;
	}
	function setDate(type){
		var d=new Date();
		var startStr="";
		var endStr="";
		if(type=="CURRENT_MONTH"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-01";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="PREVIEW_MONTH"){
			d=new Date(d.getFullYear(),d.getMonth(),1);
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-1";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="TODAY"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="YESTERDAY"){
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}
		document.getElementById("start_date").value=startStr;
		document.getElementById("end_date").value=endStr;
		doAutoCheck("cb_in_date");
	}
	function showExaPage(id){
		var url="/storehouse/InBillInfoForExamine.ihtm?id="+id;
		ShowIframe("入库单审核",url,900,500,"refreshWin()",1024,600);
	}
	function showUnExaPage(id){
		var url="/storehouse/InBillInfoForUnExamine.ihtm?id="+id;
		ShowIframe("入库单反审核",url,900,500,"refreshWin()",1024,600);
	}
	function doOut(id){
		showWin(1024,600,"/storehouse/OutBillNew.ihtm?alert_type=FORM&data_type=IN_BILL&in_bill_id="+id);
	}
	function doDownload(){
		var str=getSearchCondition();
		window.location="/storehouse/InBillSearchResult.ihtm?content_type=EXCEL&"+str;
	}
</script>
</head>
<c:set var="canExa" value="N" />
<c:set var="canUnExa" value="N" />
<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';IN_EXAM;')!=-1}"><c:set var="canExa" value="Y" /></c:if>
<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';IN_UN_EXAM;')!=-1}"><c:set var="canUnExa" value="Y" /></c:if>
<body oncontextmenu="return false">
<div class="Wrap"><!-- 页面主框架 -->
    
	<div id="ListContainer" class="Container"><!-- 主体容器 -->
	    
	    <!-- 标题栏 -->
	    <div class="Heading BillIcon">
	        <div class="HeadingContent">
	            <h1>入库单一览表</h1>
	            <span class="Note">查询当期发生的入库单记录</span>
	        </div>
	    </div>
	
		<!-- 主内容 -->
		<div class="Content">
	        <!-- 筛选控件栏 -->
	        <div class="FilterBar ClearFix">
	            <div class="SearchIcon"></div>
	            <span class="fl">
	            	<table class="MoreOption" cellpadding="0" cellspacing="0">
	            		<th class="c1" width="80px">
	            			<input type="checkbox" name="cb_in_date" id="cb_in_date" <c:if test="${cbInDate=='1' || searchType=='2'}">checked="true"</c:if> style="visibility:hidden;" />
	            			入库日期
	            		</th>
	            		<td width="360px">
	            			<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_in_date');" id="start_date" name="start_date" value="<c:out value="${startDate}" />">
			            	<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('start_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_in_date\')');">
			            	<input type="hidden" id="hid_start_date" value="<c:out value="${startDate}" />">
			            	至
			            	<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_in_date');" id="end_date" name="end_date" value="<c:out value="${endDate}" />">
			            	<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('end_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_in_date\')');">
			            	<input type="hidden" id="hid_end_date" value="<c:out value="${endDate}" />">
			            	<a href="javascript:setDate('CURRENT_MONTH');">本月</a>
							<a href="javascript:setDate('TODAY');">今天</a>
							<a href="javascript:setDate('YESTERDAY');">昨天</a>
							<a href="javascript:setDate('PREVIEW_MONTH');">上月</a>
	            		</td>
	            	</table>
	            </span>
	            <span class="fr">
	            	<a href="javascript:;" id="lnkMoreOption">更多查询选项</a>
		  			<input type="button" value=" 查 询" onClick="doSearch();" class="buttom search-but" id="sSearchButton" name="sSearchButton">
		  			<input type="button" value=" 导 出" onClick="doDownload();" class="buttom search-out" id="sDownloadButton" name="sDownloadButton" <c:if test="${currentUser.user.userType!=1 && fn:indexOf(currentUser.privs,';NO_EXPO;')!=-1}">disabled="true"</c:if>>
	            </span>
				<div id="dvMoreOptionBox" class="MoreOptionBox" style="display:none;">
					<table class="MoreOption" cellpadding="0" cellspacing="0">
						<tr>
							<th class="c1" width="80px">
			        			<input type="checkbox" name="cb_offerer" id="cb_offerer" <c:if test="${cbOfferer=='1'}">checked="true"</c:if>>
			        			供方单位
			        		</th>
			        		<td class="c1" width="240px">
			        			<select style="width:78px" name="offerer_type" id="offerer_type" onFocus="doAutoCheck('cb_offerer');">
								  	<option value="WORK_CENTER" <c:if test="${offererType=='WORK_CENTER'}">selected</c:if>>工作中心</option>
					  				<option value="PROVIDER" <c:if test="${offererType=='PROVIDER'}">selected</c:if>>供应商</option>
									<option value="COOPERATOR" <c:if test="${offererType=='COOPERATOR'}">selected</c:if>>外协商</option>
									<option value="DEPARTMENT" <c:if test="${offererType=='DEPARTMENT'}">selected</c:if>>部门</option>
									<option value="STOREHOUSE" <c:if test="${offererType=='STOREHOUSE'}">selected</c:if>>仓库</option>
					  				<option value="CLIENT" <c:if test="${offererType=='CLIENT'}">selected</c:if>>客户</option>
							  	</select>
							  	<input type="text" class="TextBox" style="width:116px" maxlength="50" name="offerer_name" id="offerer_name" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_offerer');" value="<c:out value="${offererName}" />" >
							  	<input type="hidden" id="hid_offerer_name" value="<c:out value="${offererName}" />">
			    			</td>
			    			<th class="c2" width="80px">
	                        	<input type="checkbox" name="cb_exa" id="cb_exa" <c:if test="${cbExa=='1'}">checked="true"</c:if>>
	                        	审核状态
	                        </th>
	                    	<td class="c2" width="250px">
	                        	<input type="radio" name="exa" id="exa1" onClick="doAutoCheck('cb_exa');" <c:if test="${exa==null || exa=='' || exa=='Y'}">checked="true"</c:if>>已审核
	                        	<input type="radio" name="exa" id="exa2" onClick="doAutoCheck('cb_exa');" <c:if test="${exa=='N'}">checked="true"</c:if>>未审核
	                        	<input type="radio" name="exa" id="exa3" onClick="doAutoCheck('cb_exa');" <c:if test="${exa=='A'}">checked="true"</c:if>>全部
	                    	</td>
			    		</tr>
						<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_bill_code" id="cb_bill_code" <c:if test="${cbBillCode=='1'}">checked="true"</c:if>>
			        			入库单号
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="bill_code" id="bill_code" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_bill_code');" value="<c:out value="${billCode}" />" >
								<input type="hidden" id="hid_bill_code" value="<c:out value="${billCode}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_in_type" id="cb_in_type" <c:if test="${cbInType=='1'}">checked="true"</c:if>>
			        			入库类型
			        		</th>
			    			<td class="c3">
			        			<select name="in_type" id="in_type" onFocus="doAutoCheck('cb_in_type');">
						  			<option value="0">==请选择==</option>
						  			<c:forEach var="item" items="${inTypeList}">
						  			<option value="${item.id}" <c:if test="${inType==item.id}">selected</c:if>>${item.typeName}</option>
						  			</c:forEach>
				  				</select>
			    			</td>
			    		</tr>
						<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_manager" id="cb_manager" <c:if test="${cbManager=='1'}">checked="true"</c:if>>
			        			经办人
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="15" name="manager_name" id="manager_name" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_manager');" value="<c:out value="${managerName}" />" >
								<input type="hidden" id="hid_manager_name" value="<c:out value="${managerName}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_sto" id="cb_sto" <c:if test="${cbSto=='1'}">checked="true"</c:if>>
			        			仓库
			        		</th>
			    			<td class="c3">
			        			<select name="sto_id" id="sto_id" onFocus="doAutoCheck('cb_sto');">
					  				<option value="0">==请选择==</option>
					  				<c:forEach var="item" items="${storehouseList}">
					  				<option value="${item.id}" <c:if test="${stoId==item.id}">selected</c:if>>${item.stoName}</option>
					  				</c:forEach>
				  				</select>
			    			</td>
			    		</tr>
						<tr>
	                    	<th class="c1">
			        			<input type="checkbox" name="cb_mark" id="cb_mark" <c:if test="${cbMark=='1'}">checked="true"</c:if>>
			        			备注
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="15" name="mark" id="mark" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_mark');" value="<c:out value="${mark}" />" >
								<input type="hidden" id="hid_mark" value="<c:out value="${mark}" />">
			    			</td>
			        		<th class="c2">
			        			<input type="checkbox" name="cb_ts" id="cb_ts" <c:if test="${cbTs=='1'}">checked="true"</c:if>>
	                        	账套
			        		</th>
			    			<td class="c3">
			    				<select name="ts_id" id="ts_id" onFocus="doAutoCheck('cb_ts');">
				    				<option value="0">==请选择账套==</option>
				    				<c:forEach var="item" items="${tsList}">
									<option value="${item.id}" <c:if test="${tsId==item.id}">selected</c:if>>${item.title}</option></c:forEach>
								</select>
			    			</td>
	                	</tr>
					</table>
					
			    	<div class="OptionOrderBy">
	                	<input type="checkbox" name="cb_order" id="cb_order" <c:if test="${cbOrder=='1'}">checked="true"</c:if>>
	                    	排序类型
	                    <select name="order_by" id="order_by" onFocus="doAutoCheck('cb_order');">
	                        <option value="">==请选择==</option>
					  		<option value="IN_DATE" <c:if test="${orderBy=='IN_DATE'}">selected</c:if>>入库日期</option>
					  		<option value="BILL_CODE" <c:if test="${orderBy=='BILL_CODE'}">selected</c:if>>单号</option>
	                    </select>
	                    <select name="order_sc" id="order_sc" onFocus="doAutoCheck('cb_order');">
	                        <option value="ASC" <c:if test="${orderSc=='ASC'}">selected</c:if>>升序</option>
	                        <option value="DESC" <c:if test="${orderSc=='DESC'}">selected</c:if>>降序</option>
	                    </select>
	                    <span class="fr"><a href="javascript:;" id="lnkHiddenOption">隐藏查询选项</a></span>
	                </div>
				</div>
			</div>
			
			<!-- 提示信息显示栏 -->
	        <div class="MsgBar">
	            <%@include file="../inc/AlertMsg.jsp"%>
	        </div>
			<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';STOR_COST;')!=-1 && fn:indexOf(currentUser.privs,';NO_TOTA;')==-1}">
			<div class="TopToolBar">
				<table class="ListNoteInfo" cellpadding="0" cellspacing="0">
	            	<tr>
	                	<td>入库金额合计：${costTotal}元</td>
	            	</tr>
	            </table>
			</div>
			</c:if>
     		<div class="table-list">
		        <table width="100%">
		          	<tr>
						<th width="12%">单号</th>
						<th width="8%">入库日期</th>
						<th width="10%">仓库名称</th>
						<th width="10%">入库类型</th>
						<th width="16%">供方单位</th>
						<th width="18%">备注</th>
						<th width="8%">经办人</th>
						<th width="8%">状态</th>
						<th width="10%">操作</th>						
					</tr>
					<c:forEach var="item" items="${qr.list}" varStatus="i">
					<c:if test="${(i.index mod 2)==0}"><c:set var="trClass" value="query_list_data_tr1" /></c:if>
					<c:if test="${(i.index mod 2)!=0}"><c:set var="trClass" value="query_list_data_tr2" /></c:if>
					<c:set var="defaultFontColor" value="black" />
					<c:if test="${item.inBill.examined=='Y'}"><c:set var="defaultFontColor" value="blue" /></c:if>
					<tr class="${trClass}" index="${i.index+1}" style="color:${defaultFontColor};cursor:pointer;" defaultFontColor="${defaultFontColor}" ondblclick='javascript:DoubleClick(this)' onClick='javascript:ClickCheck(this)' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)'>
						<td>
							<input type="radio" name='query_checkbox' value="${item.inBill.id}" style="display:none">
							${item.inBill.billCode}
						</td>
						<td><fmt:formatDate value="${item.inBill.inDate}" pattern="yyyy-MM-dd"/></td>
						<td>${item.stoName}</td>
						<td>${item.inTypeName}</td>
						<td>${item.offererName}</td>
						<td>${item.inBill.mark}</td>
						<td>${item.inBill.managerName}</td>
						<td>
							<c:if test="${item.inBill.examined=='Y'}"><c:if test="${canUnExa=='Y'}"><a href="javascript:showUnExaPage('${item.inBill.id}');"></c:if>已审核<c:if test="${canUnExa=='Y'}"></a></c:if></c:if>
							<c:if test="${item.inBill.examined=='N'}"><c:if test="${canExa=='Y'}"><a href="javascript:showExaPage('${item.inBill.id}');"></c:if>未审核<c:if test="${canExa=='Y'}"></a></c:if></c:if>
						</td>
						<td>
							<a href="javascript:doShow('${item.inBill.id}');">修改</a>
							<a href="javascript:doPrint('${item.inBill.id}');">打印</a>
							<!--
							<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';OUT_BILL;')!=-1}">
							<br>
							<a href="javascript:doOut('${item.inBill.id}');">生成出库单</a>
							</c:if>
							-->
						</td>
					</tr>
					</c:forEach>
				</table>
      		</div>
      		
      		<!-- 底栏 分页、操作等 -->
	        <div class="BottomToolBar ClearFix">
			    <%@include file="../inc/Pages.jsp"%>
	        </div>
			
		</div>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
	function ChangeWindowSize( container, maxWidth ){
	    setTimeout( function(){
	        var w1 = document.documentElement.clientWidth-40;
	        if( w1>maxWidth ) w1 = maxWidth;
	        else if( w1<970 ) w1 = 960;
	        container.style.width = w1+'px';
	    }, 300 );
	}
	var IsAdvSearch = false;
	(function(){
		doInit();
	    var ListContainer = document.getElementById('ListContainer');
	    ChangeWindowSize( ListContainer, 2020 );    // 超过 1280 的最大 1260 ，不全部铺满
	
	    var lnkMoreOption   = document.getElementById('lnkMoreOption');
	    var lnkHiddenOption = document.getElementById('lnkHiddenOption');
	    lnkMoreOption.onclick = function(){
	    	IsAdvSearch = true;
	        document.getElementById('dvMoreOptionBox').style.display = 'block';
	        document.getElementById('cb_in_date').style.visibility = 'visible';
	        this.style.visibility = 'hidden';
	    };
	    lnkHiddenOption.onclick = function(){
	    	IsAdvSearch = false;
	        document.getElementById('dvMoreOptionBox').style.display = 'none';
	        document.getElementById('cb_in_date').style.visibility = 'hidden';
	        lnkMoreOption.style.visibility = 'visible';
	    };
	})();
</script>
      		